package 狂神.GUI;

import java.awt.*;

/**
 * @ClassName: TestBorderLayout
 * @Auther: Drawin
 * @Date: 2021/12/23 13:35
 * @Description:
 */

public class TestBorderLayout {//东西南北中 布局
    public static void main(String[] args) {
        Frame frame = new Frame("borderlayout");

        Button east = new Button("east");
        Button west = new Button("west");
        Button north = new Button("north");
        Button south = new Button("south");
        Button center = new Button("center");

        frame.add(east,BorderLayout.EAST);
        frame.add(west,BorderLayout.WEST);
        frame.add(north,BorderLayout.NORTH);
        frame.add(south,BorderLayout.SOUTH);
        frame.add(center,BorderLayout.CENTER);

        frame.setVisible(true);
        frame.setSize(333,333);

    }
}
